package com.chenxin.interact.domain.mesRequest;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class MesOrderReqDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonProperty("HEAD")
    private Head HEAD;       // 主

    @JsonProperty("DETAILS")
    private List<DETAIL> DETAILS;   // 明细

    public static class Head {
        @JsonProperty("STOCK_NO")
        private String stockNo;//备料单号
        @JsonProperty("WORK_ORDER_NO")
        private String workOrderNo;//工单号
        @JsonProperty("WORK_SHOP_CODE")
        private String workShopCode;//车间编码
        @JsonProperty("RESOURCE_CODE")
        private String resourceCode;//产线编码
        @JsonProperty("APPLICATION_DEPT")
        private String applicationDept;//申请部门
        @JsonProperty("STOCK_TYPE")
        private String stockType;//类型（5.首套料备料10.预警备料15转产备料20整工单备料30工单挪料35前加工备料40半成品流转45工单领料）
        @JsonProperty("CREATE_BY")
        private String createBy;//创建人
        @JsonProperty("CREATE_DATE")
        private String createDate;//创建时间

        public String getStockNo() {
            return stockNo;
        }

        public String getWorkOrderNo() {
            return workOrderNo;
        }

        public String getWorkShopCode() {
            return workShopCode;
        }

        public String getResourceCode() {
            return resourceCode;
        }

        public String getApplicationDept() {
            return applicationDept;
        }

        public String getStockType() {
            return stockType;
        }

        public String getCreateBy() {
            return createBy;
        }

        public String getCreateDate() {
            return createDate;
        }
    }

    public static class DETAIL {
        @JsonProperty("LINE")
        private Long line;//行号
        @JsonProperty("ITEM_CODE")
        private String itemCode;//物料编码
        @JsonProperty("STANCE_DEMAND_QTY")
        private BigDecimal stanceDemandQty;//需求数
        @JsonProperty("SINGLE_QTY")
        private BigDecimal singleQty;//单次用量
        @JsonProperty("EQUIP_ACCOUNT_ID")
        private String equipAccountId;//设备编码
        @JsonProperty("SUBAREA")
        private String subarea;//分区
        @JsonProperty("STANCE")
        private String stance;//站位

        public Long getLine() {
            return line;
        }

        public void setLine(Long line) {
            this.line = line;
        }

        public String getItemCode() {
            return itemCode;
        }

        public void setItemCode(String itemCode) {
            this.itemCode = itemCode;
        }

        public BigDecimal getStanceDemandQty() {
            return stanceDemandQty;
        }

        public void setStanceDemandQty(BigDecimal stanceDemandQty) {
            this.stanceDemandQty = stanceDemandQty;
        }

        public BigDecimal getSingleQty() {
            return singleQty;
        }

        public void setSingleQty(BigDecimal singleQty) {
            this.singleQty = singleQty;
        }

        public String getEquipAccountId() {
            return equipAccountId;
        }

        public void setEquipAccountId(String equipAccountId) {
            this.equipAccountId = equipAccountId;
        }

        public String getSubarea() {
            return subarea;
        }

        public void setSubarea(String subarea) {
            this.subarea = subarea;
        }

        public String getStance() {
            return stance;
        }

        public void setStance(String stance) {
            this.stance = stance;
        }
    }
}
